/**
 * @ author: 汪孟苹
 */
define(["jquery","comm/toast/toast"],function($,$toast){
	var servers = {};

	/**
	 * 获取options
	 */
	servers.getOptions = function(options){
		var deafultAjax = {
            type: "post",
            contentType: "application/json;charset=UTF-8",
            dataType: "json",
            error: function(jqXHR, textStatus, errorMsg){
            	$toast.show("没有查询到患者，请再试一次！",5000);
            },
		};
		var deafultOpt = {
			serverSide: true, //启动后端分页
	        paging: true,
	        info: true,
	        destory: true,
	        stateSave: false,
	        searching: false,   // 禁掉自带的搜索
	        ordering: false,
		};
		options = $.extend(deafultOpt,options);
		options.ajax = $.extend(deafultAjax,options.ajax);
		return options;
	}

	return servers;
});